]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NotificationDaemon: only remove the source if notification sender is removed from...
authorMarina Zhurakhinskaya <marinaz@redhat.com>
Wed, 27 Jul 2011 21:08:08 +0000 (17:08 -0400)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Wed, 27 Jul 2011 21:16:05 +0000 (17:16 -0400)
This ensures that we don't remove "notify-send" sources, senders of which are
removed from DBus immediately.

js/ui/notificationDaemon.js

index 5514ac1715e8d505506c162bd1597a3f2b2d2a23..d6053e2c69a632a9075e9aae55a23fb3c395640a 100644 (file)
@@ -461,9 +461,11 @@ Source.prototype = {
 
     _onNameVanished: function() {
         // Destroy the notification source when its sender is removed from DBus.
+        // Only do so if this.app is set to avoid removing "notify-send" sources, senders
+        // of which аre removed from DBus immediately.
         // Sender being removed from DBus would normally result in a tray icon being removed,
         // so allow the code path that handles the tray icon being removed to handle that case.
-        if (!this.trayIcon)
+        if (!this.trayIcon && this.app)
             this.destroy();
     },